package first.group.ssh.version;

public record Version(String protoVersion, String softwareVersion, String comment) {
    public static final Version VERSION_STRING = new Version("2.0", "JavaSSH", "Made_by_fifth_light");
    
    @Override
    public String toString() {
        var builder = new StringBuilder();
        builder.append("SSH-");
        if (protoVersion != null) {
            builder.append(protoVersion);
        }
        builder.append("-");
        if (softwareVersion != null) {
            builder.append(softwareVersion);
        }
        if (comment != null) {
            builder.append(" ");
            builder.append(comment);
        }
        return builder.toString();
    }
}
